/* ======================================================= */
/**
 * File   : Track.java
 * Date   : Jan 23, 2010 at 5:23:35 PM
 */
/* ======================================================= */
package fr.isima.model;

import java.util.Date;

import android.util.Log;

/* ======================================================= */
/**
 *
 * @author daniel
 *
 */
/* ======================================================= */
public final class Track
{
    
    /**Debug Tag*/
    private static final String TAG = "Track";    

    /**The track id*/
    private String id;
    
    /**The name of the track*/
    private String name;
    
    /**The path to the KML file*/
    private String path;    
    
    /**Creation date of the track*/ 
    private Date date;
    
    /**The time between two points*/
    private int freqRefresh;
    
    /**The distance between two points*/
    private int distRefresh;    
   
    /* ======================================================= */
    /**
     * Get id
     * @return id
     */
    /* ======================================================= */
    public final String getId()
    {
        return id;
    }

    /* ======================================================= */
    /**
     * Get name
     * @return name
     */
    /* ======================================================= */
    public final String getName()
    {
        return name;
    }

    /* ======================================================= */
    /**
     * Get path
     * @return path
     */
    /* ======================================================= */
    public final String getPath()
    {
        return path;
    }

    /* ======================================================= */
    /**
     * Get date
     * @return date
     */
    /* ======================================================= */
    public final Date getDate()
    {
        return date;
    }    
    
    /* ======================================================= */
    /**
     * Get freqRefresh
     * @return freqRefresh
     */
    /* ======================================================= */
    public final int getFreqRefresh()
    {
        return freqRefresh;
    }

    /* ======================================================= */
    /**
     * Get distRefresh
     * @return distRefresh
     */
    /* ======================================================= */
    public final int getDistRefresh()
    {
        return distRefresh;
    }

    /* ======================================================= */
    /**
     * @param name
     * @param path
     * @param date
     */
    /* ======================================================= */
    public Track(String name, String path, Date date)
    {
        this.name = name;
        this.path = path;
        this.date = date;
        Log.d(TAG, "Creation " + this);
    }

    /* ======================================================= */
    /**
     * @param name
     * @param path
     * @param date
     * @param freqRefresh
     * @param distRefresh
     */
    /* ======================================================= */
    public Track(String name, String path, Date date, int freqRefresh,
            int distRefresh)
    {
        this.name = name;
        this.path = path;
        this.date = date;
        this.freqRefresh = freqRefresh;
        this.distRefresh = distRefresh;
        Log.d(TAG, "Creation " + this);
    }

    /* ======================================================= */
    /**
     * @param id
     * @param name
     * @param path
     * @param date
     * @param freqRefresh
     * @param distRefresh
     */
    /* ======================================================= */
    public Track(String id, String name, String path, Date date,
            int freqRefresh, int distRefresh)
    {
        this.id = id;
        this.name = name;
        this.path = path;
        this.date = date;
        this.freqRefresh = freqRefresh;
        this.distRefresh = distRefresh;
        Log.d(TAG, "Creation " + this);
    }

    /* ======================================================= */
    /* 
     * @see java.lang.Object#toString()
     */
    /* ======================================================= */
    @Override
    public String toString()
    {
        StringBuilder builder = new StringBuilder("Track [");
        
        builder.append("id=" + id + ", ");
        builder.append("name=" + name + ", ");
        builder.append("path=" + path + ", ");        
        
        builder.append("date=" +date +", ");
        
        builder.append("freqRefresh=" + freqRefresh + ", ");        
        
        
        builder.append("distRefresh=" + distRefresh + "]");        
        
        return builder.toString();
    }
        
    
}
